extends StaticBody2D

@onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D
@onready var collision_shape_2d: CollisionShape2D = $CollisionShape2D
@onready var interactable_component: InteractableComponent = $InteractableComponent

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	collision_layer = 1


func _on_interactable_component_interactable_activated() -> void:
	animated_sprite_2d.play("door_open")
	collision_layer = 2


func _on_interactable_component_interactable_deactivated() -> void:
	animated_sprite_2d.play("door_close")
	collision_layer = 1
